package com.book.entity;

import com.alibaba.fastjson.serializer.ToStringSerializer;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 
 * 
 * @author yang
 * @email yang@gmail.com
 * @date 2020-12-05 14:30:35
 */
@Data
@TableName("t_book")
public class BookEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * id
	 */
	@TableId
	private Long id;
	/**
	 * 图书名称
	 */
	private String name;
	/**
	 * 图书价格
	 */
	private BigDecimal price;
	/**
	 * 图书类型id
	 */
	private Long bookTypeId;
	/**
	 * 评论图书id
	 */
	private Long bookEvaluationId;
	/**
	 * 图书详细信息
	 */
	private String bookDetail;
	/**
	 * 图片头地址
	 */
	private String pictureHeadPath;
	/**
	 * 销量
	 */
	private Integer sales;
	/**
	 * 库存
	 */
	private Integer stock;
	/**
	 * 显示状态[0-不显示；1-显示]
	 */
	@TableLogic(value = "1",delval = "0")
	private Integer showStatus;


	@TableField(exist = false)
	private Integer count;


	@TableField(exist = false)
	private BigDecimal totalPrice;

	@TableField(exist = false)
	private String[] detailPriPath;


	@Version
	@TableField(fill = FieldFill.INSERT)
	private Integer version;



	/**
	 * 创建时间
	 */
	@TableField(fill = FieldFill.INSERT)
	private Date createtime;
	/**
	 * 修改时间
	 */
	@TableField(fill = FieldFill.INSERT_UPDATE)
	private Date updatetime;

}
